<?php
@header("content-type:text/html;charset=utf-8");
@header("Access-Control-Allow-Origin:*");
mysql_connect("localhost:3306","root","root");
mysql_select_db("1904");
mysql_query("set character set utf8");
mysql_query("set names utf8");
$user_phone=$_GET["user_phone"];
$user_pwd=$_GET["user_pwd"];
$user_name=$_GET["user_name"];
$id=$_GET["id"];
$sql="update userinfo set user_name='$user_name',user_phone='$user_phone',user_pwd='$user_pwd' where id='$id'";
mysql_query($sql);
$arr=array();
if(mysql_affected_rows()>0){
$arr["status"]=true;
}
else{
$arr["status"]=false;   
}
echo json_encode($arr)
?>